﻿using CommunityToolkit.Mvvm.ComponentModel;
using System.Text.Json;

namespace Validator.ViewModels
{
    partial class MainWindow1Model : ObservableObject
    {
        /*
         * ObservableProperty
         * RelayCommand
         * Messenger
         */
        public MainWindow1Model()
        {
            var vm = new MainWindow1Model() { Name = "Test", Age = 10, Guid = new Guid() };
            var json = JsonSerializer.Serialize(vm);
        }
    }
    partial class MainWindow1Model : ObservableObject
    {
        [ObservableProperty]
        //[property: JsonPropertyName("FullName")]
        string? name;
        [ObservableProperty]
        int age;
        [ObservableProperty]
        //[property: JsonIgnore]
        Guid guid;
    }

    [ObservableObject]
    partial class Model
    {
        public string? Name { get; set; }
        public int Age { get; set; }
        public string? Address { get; set; }
    }
}
